<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <style>
        html,
        body {
            margin: 0;
            padding: 0;
            height: 100%;
            overflow: hidden;
        }

        #video {
            width: 100%;
            height: 100%;
            background: black;
        }
    </style>
</head>

<body>
    <video id="video" data-cam="{{ webrtc.cam }}" muted controls autoplay playsinline></video>
    <script src="{{ '../static/webrtc.js' if hass else url_for('static', filename='webrtc.js') }}"></script>
    <script>
        window.addEventListener('load', new Receiver({{ webrtc| tojson | safe }}));
    </script>
</body>

</html>